import request from '@/utils/request'

// 查询房型列表
export function listRoom(query) {
  return request({
    url: '/system/room/list',
    method: 'get',
    params: query
  })
}

export function listHotelRoom(hotelId) {
  return request({
    url: '/system/room/list/' + hotelId,
    method: 'get',
  })
}

// 查询房型详细
export function getRoom(hotelRoomId) {
  return request({
    url: '/system/room/' + hotelRoomId,
    method: 'get'
  })
}

// 新增房型
export function addRoom(data) {
  return request({
    url: '/system/room',
    method: 'post',
    data: data
  })
}

// 修改房型
export function updateRoom(data) {
  return request({
    url: '/system/room',
    method: 'put',
    data: data
  })
}

export function updateBatchRoom(data) {
  return request({
    url: '/system/room/batch',
    method: 'put',
    data: data
  })
}

// 删除房型
export function delRoom(hotelRoomId) {
  return request({
    url: '/system/room/' + hotelRoomId,
    method: 'delete'
  })
}
